<?php defined('SYSPATH') or die();?>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>思途CMS{$coreVersion}</title>
    {template 'stourtravel/public/public_min_js'}
    {php echo Common::getScript("uploadify/jquery.uploadify.min.js,listimageup.js"); }
    {php echo Common::getCss('uploadify.css','js/uploadify/'); }
    {php echo Common::getCss('base.css,style.css,destination_dialog_basicinfo.css'); }
</head>
<body >
   <div class="s-main">
       <div class="main-body">
           <div class="nav">
               <div class="w-set-tit bom-arrow">
                   <span data-rel="seo" class="on"><s></s>优化信息</span>
                   <span  data-rel="jieshao" ><s></s>页面介绍</span>
                   <span data-rel="template"><s></s>模板设置</span>
               </div>
               <div class="clear-both"></div>
           </div>
           <form id="frm" ul_font=-Pydqk >
            <div class="nav-list">
               <div class="item-one" id="item_jieshao" style="display: none;">
                   <table>

                       <tr><td class="tit">介绍：</td><td  class="u-editor">  {Common::getEditor('jieshao',$info['jieshao'],500,250)}</td></tr>
                   </table>
               </div>
               <div class="item-one" id="item_seo">
                   <table>
                       <!--<tr><td class="tit">显示条数：</td><td><input class="set-text-xh text_250" name="shownum" value="{$info['shownum']}"/></td></tr>!-->
                       <tr><td class="tit">优化标题：</td><td><input class="set-text-xh text_250" name="seotitle" value="{$info['seotitle']}"/></td></tr>
                       <tr><td class="tit">Tag词：</td><td><input class="set-text-xh text_250" name="tagword" value="{$info['tagword']}"/></td></tr>
                       <tr><td class="tit">关键词：</td><td><input class="set-text-xh text_250" name="keyword" value="{$info['keyword']}"/></td></tr>

                       <tr><td class="tit">描述：</td><td><textarea class="des" name="description">{$info['description']}</textarea></td></tr>
                   </table>
               </div>
               
               <div class="item-one" id="item_template" style="display: none;">
                   <table>
                       <tr><td class="tit">分类列表页：</td><td>
                               <select name="category_templet" id="category_templet">
                                   <option value="">标准模板</option>
                                   {loop $category_templet_list $tpl}
                                    <option value="{$tpl['path']}" {if $tpl['path']==$info['category_templet']}selected="selected"{/if}>{$tpl['path']}</option>
                                   {/loop}
                               </select>

                           </td>
                       </tr>
                       <tr>
                           <td class="tit">文章详情页：</td>
                           <td>
                               <select name="article_templet" id="article_templet">
                                   <option value="">标准模板</option>
                                   {loop $article_templet_list $tpl}
                                   <option value="{$tpl['path']}" {if $tpl['path']==$info['article_templet']}selected="selected"{/if}>{$tpl['path']}</option>
                                   {/loop}
                               </select>

                           </td>
                       </tr>
                   </table>
               </div>

           </div>
               <input name="attrid" type="hidden" value="{$info['id']}"/>
           </form>
       </div>


       <div class="save-con">

           <a href="javascript:;" class="confirm-btn">确定</a>
       </div>
   </div>
<script>
    var id="{$id}";
    var typeid="{$typeid}"
    $(function() {
        $(document).on('click',".i-tpl",function(){
            $(".i-tpl").removeClass('on');
            $(this).addClass('on');
        })
        $(document).on('click',".nav .bom-arrow span",function(){
            var name=$(this).attr('data-rel');
            $(this).siblings().removeClass('on');
            $(".nav-list .item-one").hide();

            $(this).addClass('on');
            $("#item_"+name).show();
        })

        $(document).on('click','.confirm-btn',function(){

            var ajaxurl = SITEURL + 'news/admin/attrid/ajax_config_save';

            $.ajaxform({
                url: ajaxurl,
                method: 'POST',
                form : '#frm',
                dataType:'json',
                success: function (data) {
                    if(data.status)
                    {
                        ST.Util.showMsg('保存成功',4);
                        //ST.Util.closeBox();//关闭当前窗口
                        //parent.window.getNav();
                    }
                    else
                    {
                        ST.Util.showMsg('保存失败',5);
                    }

                }

            });


           })
        })


</script>

</body>
</html>
